import Vue from 'vue'
import Router from 'vue-router'
import store from '../store/index'
import indexPage from '../views/index.vue'

Vue.use(Router)

const router = new Router({
  routes: [{
    path: '/',
    component: indexPage
  }
]
})
router.beforeEach((to, from, next) => {
  if (to.path == '/goods' || to.path == '/ratings' || to.path == '/seller' || to.path == '/') {
    store.state.main_tle_show = true
    next()
  } else {
    store.state.main_tle_show = false
    next()
  }

})
export default router
